<template>
  <div>
    
    <button @click="comName='UserAccount'" class="ba">显示UserAccount</button>
    
     <button @click="comName='UserInfo'">显示UserInfo</button>
      <component :is="comName" />
  </div>
</template>

<script>
import UserAccount from './components/UserAccount.vue'
import UserInfo from './components/UserInfo.vue'
export default {
  components:{
     UserAccount,
    UserInfo
  },

  data() {
    return {
      comName:'UserAccount'
    };
  },

  mounted() {
    
  },

  methods: {
    
  },
};
</script>

<style >
.ba {
margin: 50px 50px  50px  50px;

}
button{
flood-color: aqua;
}
</style>